package com.demo.swagger.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 徐老板
 * @date 2020/2/22   21:06
 */
@RestController
@Api(description = "订单管理api",value = "订单管理")
public class SwaggerController {

    @RequestMapping("/test")
    @ApiOperation(value = "测试接口")
    public String test(@ApiParam(name = "这个是哪里的名字",
            defaultValue = "{\"这个是干嘛的\":\"默认值\"}",
            value = "测试方法" ,required = true)
                           @RequestParam String param){
        return "这个是一个测试"+param;
    }

}
